package com.dongjiantong.farmrecords.mapper;

import com.dongjiantong.farmrecords.model.FarmRecordsRetailImmunization;
import com.dongjiantong.mybatis.MyMapper;

import java.util.List;
import java.util.Map;

public interface FarmRecordsRetailImmunizationMapper extends MyMapper<FarmRecordsRetailImmunization> {
    /**
     * app政府端 分页查询免疫记录
     * @param map
     * @return
     */
    List<FarmRecordsRetailImmunization> selectByMapApp(Map map);

    /**
     * 养殖端 分页查询免疫记录
     * @param map
     * @return
     */
    List<FarmRecordsRetailImmunization> selectListByStatus(Map<String, Object> map);

    /**
     * 根据单据id 查询免疫记录
     * @param id
     * @return
     */
    FarmRecordsRetailImmunization selectById(Long id);

    /**
     * 根据单据前缀查询最大单据号
     * @param prefix
     * @return
     */
    String findMaxNumber(String prefix);

    /**
     * 新建主体表信息
     * @param farmRecordsRetailImmunization
     */
    Integer createOne(FarmRecordsRetailImmunization farmRecordsRetailImmunization);
}